/* Checksum: must be the negated sum of the first two fields. */
.long -0x1BADB004
+bad_cpu_msg:
+ .asciz "Bad CPU: we need at least a P6-compatible core."
bad_cpu:
- jmp bad_cpu
+ mov $SYMBOL_NAME(bad_cpu_msg)-__PAGE_OFFSET,%esi
+ mov $0xB8000,%edi # VGA framebuffer
+1: mov (%esi),%bl
+ test %bl,%bl # Terminate on '\0' sentinel
+2: je 2b
+ mov $0x3f8+5,%dx # UART Line Status Register
+3: in %dx,%al
+ test $0x20,%al # Test THR Empty flag
+ je 3b
+ mov $0x3f8+0,%dx # UART Transmit Holding Register
+ mov %bl,%al
+ out %al,%dx # Send a character over the serial line
+ movsb # Write a character to the VGA framebuffer
+ mov $7,%al
+ stosb # Write an attribute to the VGA framebuffer
+ jmp 1b
__start:
/* Set up a few descriptors: on entry only CS is guaranteed good. */